import { IPoint, IViewer } from "./types"

export class Square {
    private _viewer?: IViewer
    constructor(private _point: IPoint, private _color: string) {}
    get viewer() {
        return this._viewer
    }
    set viewer(v) {
        this._viewer = v
        if (this._viewer) {
            this._viewer.show()
        }
    }
    get point() {
        return this._point
    }
    set point(v) {
        this._point = v
        if (this._viewer) {
            this._viewer.show()
        }
    }
    get color() {
        return this._color
    }
}
